import 'package:flutter_deer/generated/json/base/json_convert_content.dart';
import 'package:flutter_deer/index/models/banner_entity.dart';

FocusMapDetailEntity $FocusMapDetailEntityFromJson(Map<String, dynamic> json) {
  final FocusMapDetailEntity focusMapDetailEntity = FocusMapDetailEntity();
  final int? id = jsonConvert.convert<int>(json['id']);
  if (id != null) {
    focusMapDetailEntity.id = id;
  }
  final String? title = jsonConvert.convert<String>(json['title']);
  if (title != null) {
    focusMapDetailEntity.title = title;
  }
  final String? image = jsonConvert.convert<String>(json['image']);
  if (image != null) {
    focusMapDetailEntity.image = image;
  }
  final int? positionType = jsonConvert.convert<int>(json['positionType']);
  if (positionType != null) {
    focusMapDetailEntity.positionType = positionType;
  }
  final int? channelId = jsonConvert.convert<int>(json['channelId']);
  if (channelId != null) {
    focusMapDetailEntity.channelId = channelId;
  }
  final int? viewType = jsonConvert.convert<int>(json['viewType']);
  if (viewType != null) {
    focusMapDetailEntity.viewType = viewType;
  }
  final String? link = jsonConvert.convert<String>(json['link']);
  if (link != null) {
    focusMapDetailEntity.link = link;
  }
  final String? content = jsonConvert.convert<String>(json['content']);
  if (content != null) {
    focusMapDetailEntity.content = content;
  }
  final int? sort = jsonConvert.convert<int>(json['sort']);
  if (sort != null) {
    focusMapDetailEntity.sort = sort;
  }
  final String? status = jsonConvert.convert<String>(json['status']);
  if (status != null) {
    focusMapDetailEntity.status = status;
  }
  return focusMapDetailEntity;
}

Map<String, dynamic> $FocusMapDetailEntityToJson(FocusMapDetailEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['title'] = entity.title;
  data['image'] = entity.image;
  data['positionType'] = entity.positionType;
  data['channelId'] = entity.channelId;
  data['viewType'] = entity.viewType;
  data['link'] = entity.link;
  data['content'] = entity.content;
  data['sort'] = entity.sort;
  data['status'] = entity.status;
  return data;
}

BannerEntity $BannerEntityFromJson(Map<String, dynamic> json) {
  final BannerEntity bannerEntity = BannerEntity();
  final int? id = jsonConvert.convert<int>(json['id']);
  if (id != null) {
    bannerEntity.id = id;
  }
  final String? title = jsonConvert.convert<String>(json['title']);
  if (title != null) {
    bannerEntity.title = title;
  }
  final String? image = jsonConvert.convert<String>(json['image']);
  if (image != null) {
    bannerEntity.image = image;
  }
  final int? viewType = jsonConvert.convert<int>(json['viewType']);
  if (viewType != null) {
    bannerEntity.viewType = viewType;
  }
  return bannerEntity;
}

Map<String, dynamic> $BannerEntityToJson(BannerEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['title'] = entity.title;
  data['image'] = entity.image;
  data['viewType'] = entity.viewType;
  return data;
}